package com.spzx.product.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "图标地址")
    private String imageUrl;

    @Schema(description = "上级分类id")
    private String parentId;

    @Schema(description = "是否显示[0-不显示， 1-显示]")
    private Integer status;

    @Schema(description = "排序")
    private Long orderNum;

    @TableField(exist = false)
    private Boolean hasChildren;

    @TableField(exist = false)
    private List<Category> children;

}
